import  time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys

bs= webdriver.Chrome('E:/chromedriver/chromedriver.exe')
bs.get('https://www.baidu.com/')

se =bs.find_element_by_id('kw')
se.send_keys('xcar')
se.send_keys(Keys.RETURN)
time.sleep(5)
se.clear()
time.sleep(5)
bs.close()